from django.conf.urls import url
from .import views
from rest_framework.routers import DefaultRouter


urlpatterns = [

    # 获取列表数据和新增数据
    # url(r'^books/$',views.BooksAPIView.as_view()),

    # 查单一数据和更新删除数据
    # url(r'^books/(?P<pk>\d+/$)',views.BookAPIView.as_view()),
]

router = DefaultRouter()
router.register(r'books',views.BookAPIViewSet)
urlpatterns += router.urls
